import request from "@/utils/request.js";
export const listBooksService = (params) => {
  // console.log("params:", params);
  return request.get("/book/page", { params: params });
};
export const addBookService = (newBook) => {
  // console.log('newBook',newBook);
  return request.post("/book/add", newBook);
};
export const updateBookService = (data) => {
  return request.put("/book/update", data);
};
export const deleteBookService = (bookId) => {
  return request.delete(`/book/delete/${bookId}`); //需要使用反引号才能使用嵌入式表达式
};
